package com.liferay.service.impl;

import java.util.List;

import com.liferay.dao.FacultyDao;
import com.liferay.dao.impl.FacultyDaoImpl;
import com.liferay.model.Faculty;
import com.liferay.model.Group;
import com.liferay.model.Subject;
import com.liferay.service.FacultyService;

public class FacultyServiceImpl implements FacultyService {

	private FacultyDao facultyDao;
	
	public FacultyServiceImpl(){
		facultyDao = new FacultyDaoImpl();
	}
	
	@Override
	public List<Faculty> getAllFaculty() {
		return facultyDao.getAllFaculty();
	}

	@Override
	public List<Subject> getSubjectByFaculty(long fkFaculty) {
		return facultyDao.getSubjectByFaculty(fkFaculty);
	}

	@Override
	public boolean insertSubjectByFaculty(Subject subject) {
		return facultyDao.insertSubjectByFaculty(subject);
	}

	@Override
	public boolean deleteSubjectById(long id) {
		return facultyDao.deleteSubjectById(id);
	}

	@Override
	public boolean editFaculty(Faculty faculty) {
		return facultyDao.editFacult(faculty);
	}

	@Override
	public List<Group> getGroup() {
		return facultyDao.getGroup();
	}

	@Override
	public boolean addFaculty(Faculty faculty) {
		return facultyDao.addFaculty(faculty);
	}

	@Override
	public boolean deleteFaculty(Faculty faculty) {
		return facultyDao.deleteFaculty(faculty);
	}

	@Override
	public boolean updateSubjectById(String nameSubject, int numberOfCredit,
			long idSubject) {
		return facultyDao.updateSubjectById(nameSubject, numberOfCredit, idSubject);
	}

	@Override
	public List<Subject> getSubjectById(long id) {
		return facultyDao.getSubjectById(id);
	}

}
